package com.hxm.appGenealogy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hxm.appGenealogy.config.Constant;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 动态
 */
@Data
@TableName("dynamic")
public class Dynamic  {
    @TableId(type = IdType.AUTO)
    private Long id; //主键id
    private String headline; //文案
    private String image; //照片
    private Integer browse;   // 浏览量
    private Integer praise; //  点赞数
    private Long peopleId;
    @DateTimeFormat(pattern = Constant.timeFormat)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date time; //时间
    //所属于的家族：
    @TableField("family_id")
    private Long familyId;
    //评论的数量;
    private Integer commentQuantity;
    //地理位置;
    private String geographic;
    //0是重大事件,1不是重大事件;
    private Integer event;
    //经度;
    private Double longitude;
    //尾度;
    private Double latitude;
    //0是是照片1是视频;
    private Integer type;
}
